package com.whjz.dcfs.ggts.struts.action;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.whjz.dcfs.jzxx.dao.IDcfsHjjcdJbxxDAO;
import com.whjz.dcfs.jzxx.model.DcfsHjjcdJbxx;
import com.whjz.dcfs.util.BaseAction;

public class JZJCSJAction extends BaseAction{

	private static final long serialVersionUID = 1L;
	@Autowired
	private IDcfsHjjcdJbxxDAO dcfsHjjcdJbxxDAO;
	
	private DcfsHjjcdJbxx dcfsHjjcdJbxx;

	public DcfsHjjcdJbxx getDcfsHjjcdJbxx() {
		return dcfsHjjcdJbxx;
	}

	public void setDcfsHjjcdJbxx(DcfsHjjcdJbxx dcfsHjjcdJbxx) {
		this.dcfsHjjcdJbxx = dcfsHjjcdJbxx;
	}
	
	public void getDcfsHjjcdJbxxByCond_time() throws Exception{
		try{
			getHttpServletResponse().setCharacterEncoding("utf-8");
			List<DcfsHjjcdJbxx> list=dcfsHjjcdJbxxDAO.getDcfsHjjcdJbxxByCond_timeNew(dcfsHjjcdJbxx);
			StringBuffer sb=new StringBuffer();
			sb.append("{DCFS_HS_EMSTIME_View:[");
			if(list!=null&&list.size()>0){
				for(int i=0;i<list.size();i++){
					sb.append("{");
					sb.append("JKXT_MN:'"+(list.get(i).getJkxtmn()==null?"":list.get(i).getJkxtmn())+"',");
					sb.append("Datatime:'"+(list.get(i).getDatatime()==null?"":list.get(i).getDatatime())+"',");
					sb.append("Avalue:'"+(list.get(i).getAvalue()==null?"":list.get(i).getAvalue())+"',");
					sb.append("JCD_BM:'"+(list.get(i).getJcdbm()==null?"":list.get(i).getJcdbm())+"',");
					sb.append("JCD_MC:'"+(list.get(i).getJcdmc()==null?"":list.get(i).getJcdmc())+"',");
					sb.append("JCLB_MC:'"+(list.get(i).getJclbmc()==null?"":list.get(i).getJclbmc())+"',");
					sb.append("JCD_DCQD:'"+(list.get(i).getJcddcqd()==null?"":list.get(i).getJcddcqd())+"',");
					sb.append("JCD_GLMD:'"+(list.get(i).getJcdglmd()==null?"":list.get(i).getJcdglmd())+"',");
					sb.append("JCD_XDFW:'"+(list.get(i).getJcdxdfw()==null?"":list.get(i).getJcdxdfw())+"',");
					sb.append("JCD_XDJL_SP:'"+(list.get(i).getJcdxdjlsp()==null?"":list.get(i).getJcdxdjlsp())+"',");
					sb.append("JCD_XDJL_CZ:'"+(list.get(i).getJcdxdjlcz()==null?"":list.get(i).getJcdxdjlcz())+"'");
					sb.append("}");
					if(i<list.size()-1){
						sb.append(",");
					}
				}
			}
			sb.append("]}");
			getHttpServletResponse().getWriter().println(sb.toString());
		}catch(Exception e){
			e.printStackTrace();
		}
	}
}
